<!--

 Copyright 2018-present Sonatype, Inc.
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

-->

<span style="display: none" #metaTitle i18n>Stats – Central Repository for Maven, Gradle, Kotlin, Scala and more</span>
<span style="display: none" #metaDescription i18n>
  Statistics for the official Central Repository for Maven, Gradle, Kotlin, Scala and more
</span>;

<div class="stats">

  <h3 class="ellipsis" i18n>Statistics for the Central Repository</h3>

  <mat-card class="mat-smo-default-card stats-card" *ngIf="stat">

    <mat-card-header>
      <div mat-card-avatar class="stats-header-image">
        <mat-icon>check_circle</mat-icon>
      </div>
      <mat-card-title i18n>Status</mat-card-title>
      <mat-card-subtitle i18n>Systems is running optimal</mat-card-subtitle>
    </mat-card-header>

    <mat-card-content>
      <div class="label-value-table">
        <div class="label-column">
          <div class="ellipsis" i18n>Date index last refreshed</div>
          <div class="ellipsis" i18n>Total number of artifacts indexed (GAV)</div>
          <div class="ellipsis" i18n>Total number of unique artifacts indexed (GA)</div>
          <div class="ellipsis" *ngIf="stat?.repoSize > 0">Current size of repository on disk</div>
        </div>
        <div class="value-column">
          <div>{{ stat?.dateModified }}</div>
          <div>{{ stat?.gavNumber }}</div>
          <div>{{ stat?.gaNumber }}</div>
          <div *ngIf="stat?.repoSize > 0">{{ stat?.repoSize }} <ng-container i18n>MB</ng-container></div>
        </div>
      </div>
    </mat-card-content>

  </mat-card>

  <mat-card class="stats-card" *ngIf="!stat">

    <mat-card-header>
      <div mat-card-avatar class="stats-header-image warning">
        <mat-icon>warning</mat-icon>
      </div>
      <mat-card-title i18n>Status</mat-card-title>
      <mat-card-subtitle i18n>Systems appears unavailable</mat-card-subtitle>
    </mat-card-header>

  </mat-card>

</div>
